package tw.singleton.SingleObject;

public class LazyUnsafeSingle {
    //懒汉式加载，线程不安全
    private static LazyUnsafeSingle instance;
    private LazyUnsafeSingle(){}
    public static LazyUnsafeSingle getInstance() {
        if (instance == null) {
            instance = new LazyUnsafeSingle();
        }
        return instance;
    }

    public void showMessage(){
        System.out.println("Hello World!懒汉式加载，多线程不安全");
    }
}
